#import "HazeInspireController.h"
        
#import "HazeInspireModel.h"
#import "HazeInspireCell.h"
#import "Masonry.h"

@interface HazeInspireController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *flourishCollectionView;
@property (nonatomic, strong) NSMutableArray *mergeDatas;

@end

@implementation HazeInspireController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self resilientZipperOpusSetupview];
	[self quenchfetchData];
}


//: 初始化页面UI
- (void)resilientZipperOpusSetupview {
	[self.view addSubview:self.flourishCollectionView];
	[self.flourishCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.edges.equalTo(self.view);
	}];
}


//: 懒加载数据模型数组
- (NSMutableArray *)mergeDatas {
	if (!_mergeDatas) {
		_mergeDatas = [NSMutableArray array];
	}
	return _mergeDatas;
}

//: 获取数据模型
- (void)quenchfetchData {
	
}

- (UICollectionView *)flourishCollectionView {
    if (!_flourishCollectionView) {
        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
        flowLayout.minimumLineSpacing = 10;
        flowLayout.minimumInteritemSpacing = 10;
        flowLayout.itemSize = CGSizeMake(100, 100);
        flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _flourishCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:flowLayout];
        _flourishCollectionView.backgroundColor = UIColor.clearColor;
        _flourishCollectionView.delegate = self;
        _flourishCollectionView.dataSource = self;
        _flourishCollectionView.showsHorizontalScrollIndicator = NO;
        _flourishCollectionView.showsVerticalScrollIndicator = NO;
        [_flourishCollectionView registerClass:[HazeInspireCell class] forCellWithReuseIdentifier:NSStringFromClass([HazeInspireCell class])];
    }
    return _flourishCollectionView;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.mergeDatas.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    HazeInspireCell *dreamXylophoneRipple = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([HazeInspireCell class]) forIndexPath:indexPath];
    return dreamXylophoneRipple;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
